﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="MyControlLibrary" Namespace="com.demo" TagPrefix="cc1" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <br />
        <cc1:UploadButton ID="UploadButton1" runat="server">
<UploadProgressSetting DueTime="1000" Period="2000" Enabled="True" CallbackFunc="call"></UploadProgressSetting>
        </cc1:UploadButton>
        
        <br />

        <br />
        <br />
        <table style="width:800px">
            <tr>
                <td id="barCell" style="width:0%; height:10px; background-color:Green;"></td>
                <td id="percentCell" style="width:100%"></td>
            </tr>
        </table>
    
    <script type="text/javascript">
        function callback(result) {

            var elemBar = document.getElementById("barCell");
            var elemPercent = document.getElementById("percentCell");

            elemBar.style.width = result + "%";
            elemPercent.innerHTML = result + "%"
        }
    </script>
        
    </div>
    </form>
</body>
</html>
